From e6987671c1d130c8d73fc3a1f3eac736e0fc03d8 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Thu, 26 Aug 2004 22:20:49 +0000 Subject: [PATCH] bitkeeper revision 1.1159.54.1 (412e6241CCJDiaJTDiwZxUEAHptmNA) Fix exporting of whole disks as VBDs. --- linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c index 7a50b14fb2..c60e8fd304 100644 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -32,7 +32,7 @@ typedef unsigned char byte; /* from linux/ide.h */ static unsigned int blkif_state = BLKIF_STATE_CLOSED; static unsigned int blkif_evtchn, blkif_irq; -static int blkif_control_rsp_valid; +static volatile int blkif_control_rsp_valid; static blkif_response_t blkif_control_rsp; static blkif_ring_t *blk_ring; @@ -1125,16 +1125,20 @@ static void blkif_status_change(blkif_fe_interface_status_changed_t *status) recovery = 0; wmb(); + blkif_state = BLKIF_STATE_CONNECTED; + /* Kicks things back into life. */ flush_requests(); } else { + /* transtion to connected in case we need to do a + a partion probe on a whole disk */ + blkif_state = BLKIF_STATE_CONNECTED; + /* Probe for discs that are attached to the interface. */ xlvbd_init(); } - - blkif_state = BLKIF_STATE_CONNECTED; /* Kick pending requests. */ spin_lock_irq(&blkif_io_lock); -- 2.30.2